#include "afxtempl.h"
#if !defined(CMenuCH_h)
#define CMenuCH_h

class CMenuItem
{
public:
	CMenuItem(LPTSTR strText,CBitmap* pBitmap=NULL,HICON hIcon=NULL)
	{
		lstrcpy(m_szText,strText);
		m_pBitmap = pBitmap;
		m_hIcon   = hIcon;
	}
public:
	TCHAR	  m_szText[128];		// message text 
	TCHAR*     m_pszHotkey;			// hotkey text
	CBitmap*  m_pBitmap;			
	HICON	  m_hIcon;
	int		  m_nWidth,			
		      m_nHeight;
};
class CMenuCH:public CMenu
{
public:
	CMenuCH();
	~CMenuCH();
public:
	BOOL AppendMenu(UINT nFlags,UINT nIDNewItem,LPTSTR lpszNewItem,
					UINT nIDBitmap=NULL,HICON hIcon=NULL);
protected:
	virtual void MeasureItem(LPMEASUREITEMSTRUCT lpMIS);
	virtual void DrawItem(LPDRAWITEMSTRUCT lpDIS);
	void DrawXPMenu(LPDRAWITEMSTRUCT lpDIS);
	void DrawCheckMark(CDC* pDC,int x,int y,COLORREF color);
protected:
	CTypedPtrList<CPtrList,CMenuItem *> m_MenuList;
  CDC* pDC;
public:
	COLORREF	m_SelColor;
	int			m_curSel;
};
#endif